package io.kiki.sba.registry.common.model.dataserver;

import lombok.Getter;

import java.io.Serializable;


@Getter
public final class DatumVersion implements Serializable {


    private final long value;

    public DatumVersion(long value) {
        this.value = value;
    }

    public static DatumVersion of(long v) {
        return new DatumVersion(v);
    }


    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        DatumVersion that = (DatumVersion) o;
        return value == that.value;
    }

    @Override
    public int hashCode() {
        return Long.valueOf(value).hashCode();
    }
}
